<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2012-1-11
  Time: 8:31:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8"%>

<%@ page import="org.springframework.web.context.WebApplicationContext" %>
<%@ page import="org.springframework.web.context.support.WebApplicationContextUtils" %>
<%@ page import="java.util.*,java.io.*,java.text.*,java.net.*,com.apptravel.util.uploadUtil" %>

<%@ page import="org.apache.log4j.Logger" %>
<%@page import="java.util.Calendar"%>
<%@ page import="org.springframework.util.ResourceUtils" %>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page isELIgnored="false" %>
<%
	WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(application);
	String path = request.getContextPath();
	String serverDomain = request.getServerName();

	Calendar calendar = Calendar.getInstance();
	calendar.add(Calendar.YEAR,-5);
	int beginYear = calendar.get(Calendar.YEAR);
	calendar.add(Calendar.YEAR,10);
	int endYear = calendar.get(Calendar.YEAR);
	request.setAttribute("beginYear",beginYear);
	request.setAttribute("endYear",endYear);

	String userAgent = request.getHeader("User-Agent");
	if(userAgent.indexOf("IE") > -1){
		request.setAttribute("agent","IE");
	}else if(userAgent.indexOf("Mozilla") > -1){
		request.setAttribute("agent","FF");
	}else{
		request.setAttribute("agent","OTHER");
	}



	request.setAttribute("uploadHttp",uploadUtil.getUploadHttp());
%>
<c:set var="path" value="<%=path %>"/>
<c:set var="CSS_PATH" value="${path }/css" scope="request" />
<c:set var="JS_PATH" value="${path }/js" scope="request" />
<c:set var="IMAGE_PATH" value="${path }/images" scope="request" />


